//
//  UPContactManager.h
//  Uang Pasti
//
//  Created by 李永彬 on 2025/8/27.
//

#import <Foundation/Foundation.h>
#import <Contacts/Contacts.h>

NS_ASSUME_NONNULL_BEGIN

@interface UPContactManager : NSObject

+ (instancetype)shared;

@property (nonatomic, strong) CNContactStore *store;

- (void)requestAccessWithCompletion:(void (^)(BOOL granted))completion;
- (void)fetchAllContactsWithCompletion:(void (^)(NSArray<CNContact *> * _Nullable contacts, NSError * _Nullable error))completion;
- (NSDictionary<NSString *, id> *)formattedContactInfo:(CNContact *)contact;

@end

NS_ASSUME_NONNULL_END
